<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>forEach()方法</title>
		<script>
			let arr=[1,2,3,4]
			console.log('原数组：'+arr)
			arr.forEach(function(element,index,arr){
			    arr[index] = element+1;
			})  
			console.log('新数组：'+arr)
		</script>
	</head>
	<body>
	</body>
</html>
